<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center helpCenter_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub helpCenter_fd0_0'>
					<view class='flex flex-wrap align-center helpCenter_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  helpCenter_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<text class='helpCenter_fd0_0_c1'>帮助中心</text>
					<view class='flex flex-wrap align-center justify-end helpCenter_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="flex flex-wrap align-end justify-center benben-position-layout flex helpCenter_flex_1"
				:style="{top:(82+StatusBarRpx)+'rpx', }">
				<view class='flex flex-wrap align-center helpCenter_fd1_0'>
					<text class='fu-iconfont2  helpCenter_fd1_0_c0'>&#xE77E;</text>
					<benben-input class='flex-sub helpCenter_fd1_0_c1' type="text" :placeholder="`有问题点我搜索`"
						confirm-type="done" :maxlength="50"
						placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx" @input="getListFunc()"
						v-model="keywords" />
				</view>

			</view>
			<view :style="{height: '88rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout helpCenter_flex_2">
				<view class='flex flex-wrap align-center helpCenter_fd2_0'>
					<template v-for='(item,key0) in classificationList'>
						<view class='flex flex-direction flex-wrap align-center helpCenter_fd2_0_c0'
							@tap.stop="handleJumpDiy" data-type="navigateTo"
							:data-url="`/pages/wode/problemList/problemList?id=${item.aid}`" :key='key0'>
							<image class='helpCenter_fd2_0_c0_c0' mode="aspectFit" :src='item.cat_img'></image>
							<text class='helpCenter_fd2_0_c0_c1'>{{item.name}}</text>
						</view>
					</template>

				</view>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout helpCenter_flex_3">
				<text class='helpCenter_fd3_0'>常见问题</text>
				<template v-for='(item,key0) in dataList'>
					<view class='flex flex-wrap align-center justify-between helpCenter_fd3_1' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/wode/issueDetails/issueDetails?id=${item.aid}`"
						:key='key0'>
						<text class='flex-sub helpCenter_fd3_1_c0'>{{item.title}}</text>
						<text class='fu-iconfont2  helpCenter_fd3_1_c1'>&#xe78e;</text>
					</view>
				</template>

				<benben-empty :list-data="dataList">
					<view class='flex flex-direction flex-wrap align-center helpCenter_fd3_2'>
						<image class='helpCenter_fd3_2_c0' mode="widthFix" :src='STATIC_URL+"58.png"'></image>

					</view>
				</benben-empty>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"classificationList": [],
				"dataList": [],
				"keywords": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getClassificationFunc()
			this.getListFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取问题分类
			async getClassificationFunc() {
				//请求方法
				//数据验证

				let dataclassificationList = await this.$api.post(global.apiUrls.post636cb7db800ed, {

				});

				if (dataclassificationList.data.code != 1) {
					this.$message.info(dataclassificationList.data.msg);
					return
				}
				let infoclassificationList = dataclassificationList.data;
				this.classificationList = infoclassificationList.data

			},
			//获取问题列表
			async getListFunc() {
				//请求方法
				//数据验证

				let datadataList = await this.$api.get(global.apiUrls.post64ddf9bb54684, {
					keywords: this.keywords
				});

				if (datadataList.data.code != 1) {
					this.$message.info(datadataList.data.msg);
					return
				}
				let infodataList = datadataList.data;
				this.dataList = infodataList.data

			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(image-path('131.png')) no-repeat;
		background-size: 100% auto;
	}

	.helpCenter_flex_0 {
		background: url(image-path('131.png')) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.helpCenter_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
		line-height: 50rpx;
	}

	.helpCenter_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.helpCenter_fd0_0_c0 {
		width: 120rpx;
		height: 88rpx;
	}

	.helpCenter_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.helpCenter_flex_1 {
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 82rpx;
	}

	.helpCenter_fd1_0_c1 {
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		margin: 0rpx 24rpx 0rpx 24rpx;
	}

	.helpCenter_fd1_0_c0 {
		font-size: 28rpx;
		color: rgba(155, 155, 155, 1);
		margin: 0rpx 0rpx 0rpx 23rpx;
	}

	.helpCenter_fd1_0 {
		background: #FFFFFF;
		border-radius: 33rpx 33rpx 33rpx 33rpx;
		width: 686rpx;
		height: 72rpx;
		margin: 0rpx 24rpx 0rpx 11rpx;
	}

	.helpCenter_flex_2 {
		margin: 202rpx 0rpx 24rpx 0rpx;
	}

	.helpCenter_fd2_0_c0_c1 {
		margin: 20rpx 0rpx 0rpx 0rpx;
		color: #333333;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
	}

	.helpCenter_fd2_0_c0_c0 {
		width: 64rpx;
		height: 64rpx;
	}

	.helpCenter_fd2_0_c0 {
		margin: 0rpx 22rpx 0rpx 22rpx;
	}

	.helpCenter_fd2_0 {
		background: rgba(255, 255, 255, 1);
		margin: 0rpx 24rpx 0rpx 24rpx;
		padding: 40rpx 0rpx 40rpx 0rpx;
		background-size: 100% auto;
		border-radius: 16rpx;
	}

	.helpCenter_flex_3 {
		background: rgba(255, 255, 255, 1);
		background-size: 100% auto;
		border-radius: 16rpx 16rpx 0rpx 0rpx;
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.helpCenter_fd3_2_c0 {
		width: 400rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.helpCenter_fd3_2 {
		width: 100%;
		padding: 50rpx 0rpx 50rpx 0rpx;
		margin: 0rpx 0rpx 100rpx 0rpx;
	}

	.helpCenter_fd3_1_c1 {
		font-size: 20rpx;
		color: rgba(0, 0, 0, 1);
	}

	.helpCenter_fd3_1_c0 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.helpCenter_fd3_1 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.helpCenter_fd3_0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 700;
		line-height: 45rpx;
		margin: 32rpx 0rpx 8rpx 0rpx;
	}
</style>